package com.premedsidekick;

import android.app.ListActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ListView;

public class MedAppProfileActivity extends ListActivity {
	
	public void onCreate(Bundle savedInstanceState) {
	        super.onCreate(savedInstanceState);
	        
	        Resources res = getResources();
	        String[] user_menu = res.getStringArray(R.array.user_profile);
	        //set Header		
			View header = getLayoutInflater().inflate(R.layout.pageheader, null);
			//set Footer - Later
			//View footer = getLayoutInflater().....
			//get ListView from this ListActivity 
			ListView listView = getListView();
			//Add Header view into the list view
			listView.addHeaderView(header);
	        //invoke the custom-made adapter
			SimpleArrayAdapterProgressBar adapter = new SimpleArrayAdapterProgressBar(this, user_menu);
		    setListAdapter(adapter);
	        //setSubmitClickListener();
	        
	        }
	private void setSubmitClickListener() {
    	Button submitButton = (Button)findViewById(R.id.button1);
    	submitButton.setOnClickListener(
    			new View.OnClickListener() {
					
					@Override
					public void onClick(View v) {
						Intent intent = new Intent();
						setResult(RESULT_OK, intent);
		                finish();
						}

				}
    	);
    }	

	
}